package com.llq.studentinfo;

import static org.junit.Assert.assertEquals;

import java.util.Date;

import com.llq.util.DateUtil;

public class CourseSessionTest  extends SessionTest{

	private static final String department = "ENGL";
	private static final String number = "103";
	private Date startDate;
	private Date endDate;


	@Override
	public void countTest(){
		CourseSession.resetCount();
		creatSession();
		assertEquals(1, CourseSession.getCount());
		creatSession();
		assertEquals(2, CourseSession.getCount());
	}

//	@Override
//	public Session creatSession(Course course, Date startDate) {
//		return CourseSession.creat(department, number, startDate);
//	}
	@Override
	public void sessionDateTest() {

		startDate = DateUtil.creatDate(2009, 1, 6);
		endDate = DateUtil.creatDate(2009, 4, 25);
		Session session = creatSession(new Course(department, number), startDate);
		assertEquals(startDate, session.getStartDate());
		assertEquals(endDate, session.getEndDate());
	}

	@Override
	public Session creatSession(Course course, Date startDate) {
		// TODO Auto-generated method stub
		return CourseSession.creat(course, startDate);
	}

}
